This script converts Katakana of selection range of front document to Hiragana if the document is Japanese. You can write more scripts for other possible conversion cases.